<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header('修改通知公告')"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-fantasyNotice-edit" th:object="${fantasyNotice}">
            <input id="noticeId" name="noticeId" th:field="*{noticeId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">公告类型：</label>
				<div class="col-sm-8">
					<select class="form-control" name="noticeType" th:with="type=${@dict.getType('fantasy_notice_type')}">
						<option value="">所有</option>
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${fantasyNotice.noticeType == dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">是否置顶：</label>
				<div class="col-sm-8">
					<select class="form-control" name="isTop">
						<option value="0" th:selected="${fantasyNotice.isTop == '0'}">否</option>
						<option value="1" th:selected="${fantasyNotice.isTop == '1'}">是</option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">公告内容：</label>
				<div class="col-sm-8">
					<textarea id="noticeContent" name="noticeContent" th:field="*{noticeContent}" class="form-control"></textarea>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注信息：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark" th:field="*{remark}" class="form-control"></textarea>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "fantasy/fantasyNotice"
		$("#form-fantasyNotice-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-fantasyNotice-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
